package br.com.mucceli.politicapopular.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author mucceli
 */
@Embeddable
public class PoliticoEscandaloPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "FK_POLITICO")
    private int fkPolitico;
    @Basic(optional = false)
    @NotNull
    @Column(name = "FK_ESCANDALO")
    private int fkEscandalo;

    public PoliticoEscandaloPK() {
    }

    public PoliticoEscandaloPK(int fkPolitico, int fkEscandalo) {
        this.fkPolitico = fkPolitico;
        this.fkEscandalo = fkEscandalo;
    }

    public int getFkPolitico() {
        return fkPolitico;
    }

    public void setFkPolitico(int fkPolitico) {
        this.fkPolitico = fkPolitico;
    }

    public int getFkEscandalo() {
        return fkEscandalo;
    }

    public void setFkEscandalo(int fkEscandalo) {
        this.fkEscandalo = fkEscandalo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fkPolitico;
        hash += (int) fkEscandalo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PoliticoEscandaloPK)) {
            return false;
        }
        PoliticoEscandaloPK other = (PoliticoEscandaloPK) object;
        if (this.fkPolitico != other.fkPolitico) {
            return false;
        }
        if (this.fkEscandalo != other.fkEscandalo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.mycompany.mavenproject1.PoliticoEscandaloPK[ fkPolitico=" + fkPolitico + ", fkEscandalo=" + fkEscandalo + " ]";
    }
    
}
